<template>
    <div>
        <div>
            头部
            <slot name="heard"></slot>
        </div>
        <div v-for="(item,index) in data" :key="index">
            传递插槽数据
            <slot :data="item" :index="index"></slot>
        </div>
    </div>
</template>

<script setup lang="ts">
import { reactive } from 'vue';

const data = reactive([
    {
        name: '11'
    },
    {
        name: '22'
    },
     {
        name: '33'
    }, 
    {
        name: '44'
    }
])

</script>


<style></style>